-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(v2): Implement proof-of-concept Docusaurus Debug Dashboard #2928
Conversation
Deploy preview for docusaurus-2 ready! Built with commit ca8efe1 |
This is crazy. Such good work! Btw do let your intern manager know about the Docusaurus work you're doing on the side and you can get him to request for a peer feedback from me. You should get credit for the side Docusaurus work because it's still benefitting Facebook 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is such good work! Very glad to see that you made the debug dashboard not coupled to any theme. Is there a way to use Infima styles just on this dashboard page regardless of theme?
Next steps would be to add filtering among the routes and maybe nested routes (for docs)
|
||
contentLoaded({actions: {addRoute}}) { | ||
addRoute({ | ||
path: normalizeUrl([baseUrl, '__docusaurus/debug']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we ignore the baseUrl
? I was thinking the debug pages should be entirely standalone
that's cool :) |
Motivation
This PR implements the docusaurus debug dashboard proposal in #2267.
It utilizes the generated files to produce some useful information. Currently, it only includes resolutions of aliased path and routes list, but we can do more fancy analysis in the future. In the future, we can also make
@docusaurus/core
to generate more files so that more useful debug information can be displayed.I included it in the classic preset only in dev to reduce bundle size.
I will add it to the docs once the maintainers think this is a good start.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
yarn start
and goto http://localhost:3000/__docusaurus/debugCheck the preview url to ensure it's not in prod mode.
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)